# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=xrdesktop
pkgver=0.15.2
pkgrel=4
pkgdesc="A library for XR interaction with traditional desktop compositors"
url="https://gitlab.freedesktop.org/xrdesktop/xrdesktop"
arch="all"
license="MIT AND CC-BY-SA-4.0"
depends="python3"
depends_dev="py3-gobject3-dev"
makedepends="$depends_dev
	glslang
	gtk-doc
	gxr-dev
	meson
	python3-dev
	"
source="https://gitlab.freedesktop.org/xrdesktop/xrdesktop/-/archive/$pkgver/xrdesktop-$pkgver.tar.gz"
subpackages="$pkgname-dev"

build() {
	abuild-meson \
		-Dapi_doc=true \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	# The XR tests require a working VR setup
	meson test --no-rebuild -v -C output --no-suite xr --no-suite post-install
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="df4b894452d00fa65ad024530e2cb6d0ea2349cadaa8e2aa9c32c2cae5cf4d9d633271dbd7f0a4b98ff72fdde1a7bc96f2a84baa16d7e4eb2f53c56ca5d9dcfb  xrdesktop-0.15.2.tar.gz"
